//
//  PPYUserModel.swift
//  PanPanYan
//
//  Created by 向攀 on 2017/12/5.
//  Copyright © 2017年 向攀. All rights reserved.
//

import UIKit

class PPYUserModel: NSObject {
    var userName: String?
    var userMobilePhone = ""
    var userID = 0
    var userAvatar: String = ""

    var userRealName: String?
    var userProfile: String?
    
    var userLevel = 0
    
}

enum LoginState {
    case none //没有任何用户登录过
    case logedout //登录成功后,退出了
    case logedin  //正常的登录中的状态
}
class PPYLogedUserModel: PPYUserModel {
    var loginState = LoginState.none
    
    var isLogedin = false //登录成功或者未登录或者退出    true: 上次登录成功, false: 未登陆过任何账户或者登录后退出了登录
    var isOnline = false //当前是否在线,即是否登录成功
    
    var logedInType: PPYLoginType?
//    var NIMToken = ""

    var loginToken: String?
    var NIMOnline = false
    
}

//struct PPYUserModel {
//    var userName: String?
//    var userMobilePhone = ""
//    var userID = ""
//    var userAvatar: String?
//
//}
//
//struct PPYLogedUserModel: PPYUserModel {
//    static let instance = PPYUserModel()
//
//}

